找传奇、传世资源到传世资源站!

7Z压缩文件的 解压缩例子源码

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

7Z压缩解压缩.zip
7Z压缩文件的  解压缩例子源码 C#语言基础-第1张
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;using System.Collections;using System.IO;using Microsoft.Win32;using System.Windows.Forms;namespace _7Z压缩解压缩{ /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } /// <summary> /// 压缩 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, RoutedEventArgs e) { string st0 = @"C:\Users\JimmyBright\Desktop\测试图片\测试图片\1"; string st1 = @"C:\Users\JimmyBright\Desktop\测试图片\测试图片\2"; string st2 = @"C:\Users\JimmyBright\Desktop\测试图片\测试图片\3"; string st3 = @"C:\Users\JimmyBright\Desktop\测试图片\测试图片\4"; ArrayList myList = new ArrayList() { st0, st1, st2, st3 }; System.Windows.Forms.SaveFileDialog sfd = new System.Windows.Forms.SaveFileDialog(); sfd.FilterIndex = 1; sfd.Filter = "保存离线资源包:(*.7z)|*.7z"; sfd.FilterIndex = 1; sfd.Title = "保存离线资源包"; sfd.RestoreDirectory = true; sfd.FileName = "eDemo离线资源包"; sfd.ShowDialog(); if (sfd.FileName != "eDemo离线资源包") { ZipHelper.WinrarZipFile(myList, sfd.FileName); } } /// <summary> /// 解压缩 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button2_Click(object sender, RoutedEventArgs e) { string st1 = @"C:\Users\JimmyBright\Desktop"; System.Windows.Forms.OpenFileDialog dialog = new System.Windows.Forms.OpenFileDialog(); dialog.Filter = "eDemo离线资源包:(*.7z)|*.7z"; dialog.FilterIndex = 1; dialog.RestoreDirectory = true; dialog.Title = "迁入离线资源包"; dialog.FileName = "选择离线资源包"; dialog.Multiselect = false; dialog.ShowDialog(); if (dialog.FileName != "选择离线资源包") { ZipHelper.WinrarUnZipPath(dialog.FileName, st1); } } }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复